Skip to content

Conversation

@vpaturet
Copy link
Contributor

@vpaturet vpaturet commented Feb 2, 2026

Summary

As detailed in #7203, when a bookingTime parameter is provided in flex trip queries, the requestedBookingTime was calculated once relative to the search date's start-of-service, then reused for all FlexServiceDate objects across multiple days. This caused valid trips to be incorrectly filtered out when the booking time and trip departure were on different days.

Changed FlexServiceDate to store the original Instant and ZoneId, then calculate seconds-since-start-of-service on-demand relative to each date's own start-of-service. This ensures booking time comparisons use the correct reference point for each service date.

Issue

Closes #7203

Unit tests

Updated unit tests

Documentation

No

@codecov
Copy link

codecov bot commented Feb 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.17%. Comparing base (72629d7) to head (e4c3d32).
⚠️ Report is 20 commits behind head on dev-2.x.

Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #7255      +/-   ##
=============================================
+ Coverage      72.13%   72.17%   +0.04%     
- Complexity     21085    21090       +5     
=============================================
  Files           2297     2298       +1     
  Lines          85233    85189      -44     
  Branches        8489     8481       -8     
=============================================
+ Hits           61481    61485       +4     
+ Misses         20772    20733      -39     
+ Partials        2980     2971       -9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vpaturet vpaturet force-pushed the fix-flex-booking-time-multiday branch 2 times, most recently from cc8912b to c137a5b Compare February 2, 2026 04:31
@vpaturet vpaturet added the Entur Test This is currently being tested at Entur label Feb 2, 2026
@vpaturet vpaturet force-pushed the fix-flex-booking-time-multiday branch 2 times, most recently from 642bb57 to 2dfbc1f Compare February 2, 2026 08:13
When a bookingTime parameter is provided in flex trip queries, the
requestedBookingTime was calculated once relative to the search date's
start-of-service, then reused for all FlexServiceDate objects across
multiple days. This caused valid trips to be incorrectly filtered out
when the booking time and trip departure were on different days.

Changed FlexServiceDate to store the original Instant and ZoneId, then
calculate seconds-since-start-of-service on-demand relative to each
date's own start-of-service. This ensures booking time comparisons use
the correct reference point for each service date.
@vpaturet vpaturet force-pushed the fix-flex-booking-time-multiday branch from 2dfbc1f to e4c3d32 Compare February 2, 2026 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Entur Test This is currently being tested at Entur

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flexible trips incorrectly filtered when bookingTime parameter spans multiple days

1 participant